package com.app.community.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

/**
 * 注销当前账户
 * @Date 2020/10/22 12:03
 **/
@Controller
public class LogoutController {

    @GetMapping("logout")
    public String logout(HttpSession httpSession){
        httpSession.removeAttribute("userId");
        return "redirect:login";
    }

}
